From 97ca1dfd6428a8bae5b3fbdffa303d552f7b96e4 Mon Sep 17 00:00:00 2001 From: Huon Wilson Date: Tue, 24 Mar 2015 21:26:25 +1100 Subject: [PATCH] Document `include`. --- src/doc/manifest.md | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/doc/manifest.md b/src/doc/manifest.md index a58757c7a..fc2158d9c 100644 --- a/src/doc/manifest.md +++ b/src/doc/manifest.md @@ -38,12 +38,14 @@ found in the build script [guide][1]. build = "build.rs" ``` -## The `exclude` Field (optional) +## The `exclude` and `include` Fields (optional) -You can explicitly specify to Cargo that a set of globs should be ignored for -the purposes of packaging and rebuilding a package. The globs specified in this -field identify a set of files that are not included when a package is published -as well as ignored for the purposes of detecting when to rebuild a package. +You can explicitly specify to Cargo that a set of globs should be ignored or +included for the purposes of packaging and rebuilding a package. The globs +specified in the `exclude` field identify a set of files that are not included +when a package is published as well as ignored for the purposes of detecting +when to rebuild a package, and the globs in `include` specify files that are +explicitly included. If a VCS is being used for a package, the `exclude` field will be seeded with the VCS's ignore settings (`.gitignore` for git for example). @@ -54,6 +56,15 @@ the VCS's ignore settings (`.gitignore` for git for example). exclude = ["build/**/*.o", "doc/**/*.html"] ``` +```toml +[package +# ... +include = ["src/resource.data"] +``` + +The options are mutually exclusive: setting `include` will override an +`exclude`. + ## Package metadata There are a number of optional metadata fields also accepted under the -- 2.30.2